package com.expert.miniapp.dao;

import lombok.Data;
import lombok.ToString;
import jakarta.persistence.*;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 科技成果实体类
 * 对应数据库表：tech_achievement
 */
@Data
@ToString
@Entity
@Table(name = "tech_achievement")
public class TechAchievement {
    
    /**
     * 成果唯一标识（主键）
     */
    @Id
    @Column(name = "achievement_id", length = 20, nullable = false)
    @JsonProperty("achievementId")
    private String achievementId;
    
    /**
     * 自定义getter方法，直接返回原始ID
     */
    public String getAchievementId() {
        return achievementId;
    }
    
    /**
     * 自定义setter方法，直接存储原始ID
     */
    public void setAchievementId(String achievementId) {
        this.achievementId = achievementId;
    }
    
    /**
     * 成果名称
     */
    @Column(name = "name", length = 100)
    @JsonProperty("name")
    private String name;
    
    /**
     * 应用场景
     */
    @Column(name = "application_scenarios", columnDefinition = "TEXT")
    @JsonProperty("applicationScenarios")
    private String applicationScenarios;
    
    /**
     * 详细信息
     */
    @Column(name = "details", columnDefinition = "TEXT")
    @JsonProperty("details")
    private String details;
    
    /**
     * 商业模式
     */
    @Column(name = "business_model", columnDefinition = "TEXT")
    @JsonProperty("businessModel")
    private String businessModel;
    
    /**
     * 核心竞争力
     */
    @Column(name = "core_competitiveness", columnDefinition = "TEXT")
    @JsonProperty("coreCompetitiveness")
    private String coreCompetitiveness;
    
    /**
     * 技术特点
     */
    @Column(name = "technical_features", columnDefinition = "TEXT")
    @JsonProperty("technicalFeatures")
    private String technicalFeatures;
    
    /**
     * 其他信息
     */
    @Column(name = "other_info", columnDefinition = "TEXT")
    @JsonProperty("otherInfo")
    private String otherInfo;
    
    /**
     * 分类标签
     */
    @Column(name = "categories", length = 50)
    @JsonProperty("categories")
    private String categories;
    
    /**
     * 标签
     */
    @Column(name = "tags", length = 50)
    @JsonProperty("tags")
    private String tags;
    
    /**
     * 所属机构
     */
    @Column(name = "organization", length = 60)
    @JsonProperty("organization")
    private String organization;

    /**
     * 城市
     */
    @Column(name = "city", length = 50)
    @JsonProperty("city")
    private String city;

    /**
     * 摘要
     */
    @Column(name = "summary", length = 200)
    @JsonProperty("summary")
    private String summary;
    
    /**
     * 显示权重
     */
    @Column(name = "display_weight")
    @JsonProperty("displayWeight")
    private Integer displayWeight;
    
    /**
     * 图片URL
     */
    @Column(name = "image_url", length = 500)
    @JsonProperty("imageUrl")
    private String imageUrl;
}